using System;
using System.Collections.Generic;
using System.Text;

namespace ElteIk.RoboSoccer.Core.Physics
{
	/// <summary>
	/// Common base class for physical objects.
	/// </summary>
    public class SolidObject : ISimpleObject
    {
		public SolidObject()
		{
			position = new Vector2D();
			velocity = new Vector2D();
			heading = new Vector2D();
		}

        #region IPhysicalObject Members

		private Vector2D position;
		public Vector2D Position
        {
            get
            {
				return position;
            }
            set
            {
				position = value;
            }
        }

		private Vector2D velocity;
        public Vector2D Velocity
        {
            get
            {
				return velocity;
			}
            set
            {
				velocity = value;
            }
        }

		private Vector2D heading;
        public Vector2D Heading
        {
            get
            {
				return heading;
            }
            set
            {
				heading = value;
            }
        }

		private float mass;
		public float Mass
		{
			get
			{
				return mass;
			}
			set
			{
				mass = value;
			}
		}

		#endregion

		#region IMovable Members

		private List<Vector2D> movementVectors = new List<Vector2D>();

		public virtual IList<Vector2D> MovementVectors
		{
			get 
			{
				return movementVectors;
			}
		}

		public virtual void Move(Vector2D movementVector)
		{
			movementVectors.Add(movementVector);
		}

		#endregion
	}
}
